import Vue from 'vue'
import VueRouter from 'vue-router'

// 导入组件
import Home from '@/views/myHome.vue'
import User from '@/views/myUser.vue'
// import Demo from '@/views/demo.vue'

Vue.use(VueRouter)

const routes = [
  // { path: '/', component: Demo },
  { path: '/home', component: Home },
  { path: '/user', component: User }
]

const router = new VueRouter({
  routes
})

router.beforeEach()

export default router
